package com.beauty.product.entity;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Entity
@Table(name = "products")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Product {
    
    @Id
    private String id;
    
    @Column(nullable = false)
    private String name;
    
    @Column(nullable = false, unique = true)
    private String sku;
    
    @Column(nullable = false)
    private BigDecimal price;
    
    private BigDecimal originalPrice;
    
    @Column(name = "category_id", nullable = false)
    private Long categoryId;
    
    private String brand;
    
    @Column(length = 2000)
    private String description;
    
    @Column(length = 1000)
    private String coverImage;
    
    @Column(name = "is_published", nullable = false)
    private Boolean isPublished = false;
    
    @Column(name = "is_recommended", nullable = false)
    private Boolean isRecommended = false;
    
    @Column(name = "is_new", nullable = false)
    private Boolean isNew = false;
    
    @Column(name = "is_hot", nullable = false)
    private Boolean isHot = false;
    
    @Column(nullable = false)
    private Integer sort = 0;
    
    private Integer sales = 0;
    
    @Column(name = "created_time", nullable = false)
    private LocalDateTime createdTime;
    
    @Column(name = "updated_time")
    private LocalDateTime updatedTime;
} 